import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/blade-platform/site/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: `/api/blade-platform/site/detail/${id}`,
    method: 'get',

  })
}

export const remove = (ids) => {
  return request({
    url: '/api/blade-platform/site/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/blade-platform/site/save',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/blade-platform/site/update',
    method: 'post',
    data: row
  })
}
export const getAssociatedCamera = () => {
  return request({
    url: '/api/blade-platform/devicetable/experiment',
    method: 'get',
  })
}
/*场地下拉框*/
export const getSiteList = () => {
  return request({
    url: '/api/blade-platform/site/siteDropdown',
    method: 'get',
  })
}
/*红外下拉框*/
export const getHwList = () => {
  return request({
    url: '/api/blade-platform/devicetable/infrared',
    method: 'get',
  })
}
/*电子围栏*/
export const getFenceList = () => {
  return request({
    url: '/api/blade-platform/devicetable/camera',
    method: 'get',
  })
}
